package com.rrc.common.api

import com.rrc.common.entity.*
import retrofit2.http.Field
import retrofit2.http.FieldMap
import retrofit2.http.FormUrlEncoded
import retrofit2.http.POST

/**
 * ================================================
 * @Description: 描述
 * @Author: wxianing
 * @Date: 2022/11/3 18:25
 * ================================================
 */
interface ApiService {

    @FormUrlEncoded
    @POST("api/user/login")
    suspend fun login(
        @Field("username") username: String,
        @Field("password") password: String
    ): BaseResponse<UserVO>

    @FormUrlEncoded
    @POST("api/ad/list")
    suspend fun getBanner(@Field("type") type: String): BaseResponse<List<BannerVO>>

    @FormUrlEncoded
    @POST("api/category/list")
    suspend fun getCategory(@FieldMap hashMap: Map<String, String>): BaseResponse<List<CategoryVO>>

    @FormUrlEncoded
    @POST("api/goods/hotlist")
    suspend fun getHotGoods(@FieldMap param: Map<String, String>): BaseResponse<List<GoodsVO>>

}